﻿<subview:SubviewBase 
       xmlns:Controls="clr-namespace:NuiDicomPlayer.Controls"  
             xmlns:subview="clr-namespace:NuiDicomPlayer.Subviews"  
               
             xmlns:Elements="clr-namespace:NuiDicomPlayer.Controls.Elements"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:vtk="clr-namespace:Kitware.VTK;assembly=Kitware.VTK" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:NuiDicomPlayer.Subviews" 
             x:Class="NuiDicomPlayer.Subviews.DicomPlayer" 
             mc:Ignorable="d" 
             d:DesignHeight="900" d:DesignWidth="1440" Background="Black" Loaded="SubviewBase_Loaded_1">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="192*"/>
            <RowDefinition Height="180*"/>
            <RowDefinition Height="409*"/>
            <RowDefinition Height="119*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="51*"/>
            <ColumnDefinition Width="29*"/>
        </Grid.ColumnDefinitions>

  <!-- New DICOM -->
        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Background="White" Margin="10" >
            <Grid Width="176">
            <Elements:NuiButton  x:Name="dicominfomBtn" Padding="15,15,15,15" EnterdBkg="Gray" ExitedBkg="Transparent" OnHandFiredEvent="newdicomBtn_OnHandFiredEvent_1"  Width="104" Height="104">
                    <Image Source="../Icon Images/3floppy_unmount.png" Margin="0,0,0,0" >
                    <Image.Effect>
                        <DropShadowEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
            </Grid>
         
            <Grid Width="204">
            <Elements:NuiButton x:Name="nudicomBtn"  Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" OnHandFiredEvent="dicominfoBtn_OnHandFiredEvent_1" Width="120" Height="120" >
                    <Image Source="../Icon Images/152.png" >
                    <Image.Effect>
                        <DropShadowEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
            </Grid>
            <Grid Width="186">
                <Elements:NuiButton Tag="A" x:Name="AxialBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="120" Height="120" OnHandFiredEvent="ExecuteVTKTask" OnHandInEvent="PerformActionWhenInside" Margin="0,10,0,9" OnHandExitedEvent="OnHandExitControl">
                    <Label Content="A" FontSize="42" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" TextElement.FontWeight="Bold" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Label.Effect>
                            <DropShadowEffect/>
                        </Label.Effect>
                    </Label>
                </Elements:NuiButton>
            </Grid>
            <Grid Width="171">
                <Elements:NuiButton  Tag="C"  x:Name="CoronalBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="120" Height="120" OnHandFiredEvent="ExecuteVTKTask" OnHandInEvent="PerformActionWhenInside" Margin="0,10,0,9" OnHandExitedEvent="OnHandExitControl">
                <Label Content="C" FontSize="42" HorizontalContentAlignment="Center"   VerticalContentAlignment="Center" TextElement.FontWeight="Bold" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Label.Effect>
                        <DropShadowEffect/>
                    </Label.Effect>
                </Label>
            </Elements:NuiButton>
            </Grid>
            <Grid Width="159">
                <Elements:NuiButton  Tag="S"  x:Name="SagetalBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="120" Height="120" OnHandFiredEvent="ExecuteVTKTask" OnHandInEvent="PerformActionWhenInside" Margin="0,10,0,9" OnHandExitedEvent="OnHandExitControl">
                <Label Content="S" FontSize="42" HorizontalContentAlignment="Center"  VerticalContentAlignment="Center" TextElement.FontWeight="Bold" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Label.Effect>
                        <DropShadowEffect/>
                    </Label.Effect>
                </Label>
            </Elements:NuiButton>
            </Grid>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Background="Wheat" Margin="10,0">
            <Grid>
                <Controls:ZoneuserControl  Tag="inc" OnHandFiredEvent="decreasebtn_OnHandFiredEvent_1" EnterdBkg="Gray" ExitedBkg="Transparent" Margin="10,10,10,10" Width="167" >
                    <Label Content="-" FontSize="72" HorizontalContentAlignment="Center" Margin="42,10,0,40" Width="84" VerticalContentAlignment="Center" TextElement.FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
                </Controls:ZoneuserControl>
             </Grid>
            <Label x:Name="ModAnotation"  Content="O" Background="#FF589797" FontSize="72" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,10,10,10" Width="125"/>
            <Grid Width="202">
                <Controls:ZoneuserControl   Tag="dec" OnHandFiredEvent="increasebtn_OnHandFiredEvent_1" EnterdBkg="Gray" ExitedBkg="Transparent" Margin="0,10" Width="142">
                    <Label Content="+" FontSize="72" HorizontalContentAlignment="Center" Margin="10,10,10,37" VerticalContentAlignment="Center" TextElement.FontWeight="Bold" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5">
                   
                </Label>
            </Controls:ZoneuserControl>
            </Grid>

        </StackPanel>
        <StackPanel Grid.Column="1" HorizontalAlignment="Left" Height="508" Margin="10,10,0,0" Grid.Row="2" VerticalAlignment="Top" Width="502" Background="White" Grid.RowSpan="2">
            <StackPanel Orientation="Horizontal">
                <Grid Width="266">
                    <Elements:NuiButton  Tag="T"  x:Name="ContrastBtn" EnterdBkg="Gray" ExitedBkg="Transparent" OnHandFiredEvent="ExecuteVTKTask" OnHandInEvent="PerformActionWhenInside" Margin="52,35,50,44">
                <Image Source="../Icon Images/contrast.png" Width="148" >
                    <Image.Effect>
                        <DropShadowEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
                </Grid>
                
                <Grid Height="198" Width="202">
                    <Elements:NuiButton  Tag="B"  x:Name="BrighnessBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" OnHandFiredEvent="ExecuteVTKTask"  Margin="37,40,39,38">
                <Image Source="../Icon Images/brightness.png" Width="128" >
                    <Image.Effect>
                        <BlurEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
                </Grid>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Grid Height="204" Width="228">
                <Elements:NuiButton  Tag="Z"  x:Name="ZoomBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="120" Height="120" OnHandFiredEvent="ExecuteVTKTask">
                <Image Source="../Icon Images/searchtool.png" Margin="0,0,-10,0" >
                    <Image.Effect>
                        <DropShadowEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
                </Grid>
                <Grid Width="288">
                    <Elements:NuiButton  Tag="PV"  x:Name="PanVBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="144" Height="120" OnHandFiredEvent="ExecuteVTKTask">
                        <Image Source="../Icon Images/Pan-256.png" Margin="10,10,0,0" >
                            <Image.Effect>
                                <DropShadowEffect/>
                            </Image.Effect>
                        </Image>
                    </Elements:NuiButton>
                </Grid>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Visibility="Collapsed">
                <Grid Width="202">
                    <Elements:NuiButton Tag="PH"   x:Name="PanHBtn" Padding="5,5,5,5" EnterdBkg="Gray" ExitedBkg="Transparent" Width="160" Height="120" OnHandFiredEvent="ExecuteVTKTask">
                        <Image Source="../Icon Images/Object-Flip-Horizontal.png" Margin="10,10,0,0" >
                            <Image.Effect>
                                <DropShadowEffect/>
                            </Image.Effect>
                        </Image>
                    </Elements:NuiButton>
                </Grid>
            </StackPanel>
        </StackPanel>
        <StackPanel Grid.Column="1" HorizontalAlignment="Left" Height="172" Margin="10,10,0,0" VerticalAlignment="Top" Width="502" Background="#FFF0F0F0">
            <Elements:NuiButton x:Name="quitBtn" EnterdBkg="Gray" ExitedBkg="Transparent" OnHandFiredEvent="quitBtn_OnHandFiredEvent_1" Padding="2,5,2,5" Height="136" Margin="10,0,262,0" >
                <Image Source="../Icon Images/262.png" Margin="10,10,6,0" >
                    <Image.Effect>
                        <DropShadowEffect/>
                    </Image.Effect>
                </Image>
            </Elements:NuiButton>
        </StackPanel>
         <ListBox x:Name="logger" HorizontalAlignment="Left" Height="99" Margin="10,10,0,0" Grid.Row="3" VerticalAlignment="Top" Width="898"/>
         <WindowsFormsHost Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"   VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="wfh" Visibility="Visible" Margin="10">
            <vtk:RenderWindowControl x:Name="_renderControl"/>
        </WindowsFormsHost>
         <subview:PataintRecordWindow x:Name="pataintinfos" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Margin="10,10,10,10" Visibility="Visible" OnViewDisappear="InfoWindowDiappear" Grid.RowSpan="4">
            <subview:PataintRecordWindow.RenderTransform>
                <TranslateTransform Y="-1000"/>
            </subview:PataintRecordWindow.RenderTransform>
        </subview:PataintRecordWindow>



        <subview:NewDicomFile x:Name="newDicomFile" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Margin="10,10,10,10" Visibility="Visible" OnViewDisappear="newDicomFile_OnViewDisappear_1" Grid.RowSpan="4">
            <subview:NewDicomFile.RenderTransform>
                <TranslateTransform Y="-1000"/>
            </subview:NewDicomFile.RenderTransform>
        </subview:NewDicomFile>

    </Grid>
</subview:SubviewBase>
